import React, { memo } from 'react'
import { useRouteError } from "react-router-dom";
import style from './style.module.css'

const Error = memo(() => {
    const error = useRouteError();
    return (
      <div id={style.errorPage}>
        <h1>Oops!</h1>
        <p>抱歉，您要访问的页面不存在</p>
        <p>
          <i>{error.statusText || error.message}</i>
        </p>
      </div>
    );
})

export default Error